
#include <QTest>
#include "testvector3d.h"
#include "vector3d.h"

TestVector3d::TestVector3d(QObject *parent)
    : QObject(parent)
{

}

TestVector3d::~TestVector3d()
{

}

void TestVector3d::testGirar()
{
    Punto3d origen(0, 0, 0);
    Punto3d destino(1, 0, 0);

    Vector3d vector(origen, destino);

    vector.girar(90, 0);
    QCOMPARE(vector, Vector3d(0, 1, 0));

    vector.girar(90, 0);
    QCOMPARE(vector, Vector3d(-1, 0, 0));

    vector.girar(90, 0);
    QCOMPARE(vector, Vector3d(0, -1, 0));
}